<?php
	
class Array_model extends CI_Model{

	function ider_php_til_mysql($array)
	{
		$nyt_array = "(";

		$antal = count($array);
		$tael = 0;
	

		while($tael < $antal-1){
			$nyt_array = $nyt_array.$array[$tael].",";
			$tael++;
		}

		$nyt_array = $nyt_array.$array[$antal-1].")";

		return $nyt_array;
	}

	function post_ider_send($array)
	{
		$antal = count($array);
		$tael = 0;

		$nyt_array = '';

		while($tael < $antal-1){
			$nyt_array = $nyt_array.$array[$tael].",";
			$tael++;

		}
		$nyt_array = $nyt_array.$array[$antal-1];
		
		return $nyt_array;
	}

	function post_ider_modtag($array)
	{
		$array = explode(",", $array);
		return $array;
	}








}

?>
